<?php

namespace Addons\Weixinshare;
use Common\Controller\Addon;

/**
 * 微信分享插件插件
 * @author you
 */

    class WeixinshareAddon extends Addon{

        public $info = array(
            'name'=>'Weixinshare',
            'title'=>'微信分享插件',
            'description'=>'这是一个微信分享插件',
            'status'=>1,
            'author'=>'you',
            'version'=>'0.1'
        );

        public function install(){
            return true;
        }

        public function uninstall(){
            return true;
        }

        //实现的weixinshare钩子方法  调用方法  {:hook('weixinshare',array('title'=>'分享标题','link'=>分享链接,'desc'=>'分享描述','imgUrl'=>'分享图标','type'=>'','dataUrl'=>''))}
        public function weixinshare($param){
            $weixinshare = A('Addons://Weixinshare/Weixinshare');
            $signPackage =$weixinshare->GetSignPackage();
            $this->assign('addons_signPackage',$signPackage);
            $this->assign('addons_share_info',$param);
            $this->display('weixinshare');
        }

    }